package com.yanchi.domain;

/**
 * @author Administrator
 *
 * @desc 业务异常类
 */
public class BusinessException extends RuntimeException {

    /**
     * 错误代码
     */
    private ErrorCode errorCode;

    public BusinessException(ErrorCode errorCode) {
        super(errorCode.getDesc());
        this.errorCode = errorCode;
    }

    public BusinessException() {
        super();
    }

    public void setErrorCode(ErrorCode errorCode) {
        this.errorCode = errorCode;
    }

    public ErrorCode getErrorCode() {
        return errorCode;
    }
}
